class Shape
{
public:
    virtual int getArea() = 0;
    void setWidth(int wid)
    {
        width = wid;
    }
    void setHeight(int hei)
    {
        height = hei;
    }

protected:
    int width;
    int height;
};
class Rectangle : public Shape
{
public:
    int getArea()
    {
        return height * width;
    }
};
class Triangle : public Shape
{
public:
    int getArea()
    {
        return (width * height) / 2;
    }
};